#!/bin/python

##
### My REPL for python
##

while True:
	# read
	print(">> ", end="")
	state = input().rstrip('\n')
	
	# eval
	if state == "quit()":
		break
	try:
		res = eval(state)
	except:
		print("\033[31;minvalid statement\033[0m")
		continue
	
	# print
	print(res)
	
	# loop
